/* 任务相关样式 */
.task-container {
    max-width: 1400px;
    margin: 0 auto;
}

.task-section {
    background: rgba(26, 32, 46, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.task-section:hover {
    border-color: rgba(0, 191, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 191, 255, 0.1);
}

.task-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #00bfff 0%, #0080ff 100%);
    border-radius: 2px;
}

/* 工作路径选择样式 */
.path-selector-group {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.path-input-wrapper {
    flex: 1;
    display: flex;
    gap: 8px;
}

.path-input {
    flex: 1;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.path-input:focus {
    outline: none;
    border-color: rgba(0, 191, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.1);
}

.path-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.btn-select-path {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 191, 255, 0.1);
    border: 1px solid rgba(0, 191, 255, 0.3);
    border-radius: 12px;
    color: #00bfff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-select-path:hover {
    background: rgba(0, 191, 255, 0.2);
    border-color: rgba(0, 191, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(0, 191, 255, 0.2);
}

.btn-open-location {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    color: #22c55e;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-open-location:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(34, 197, 94, 0.2);
}

.btn-open-location:disabled {
    background: rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.3);
    color: rgba(107, 114, 128, 0.7);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.path-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 12px;
    background: rgba(0, 191, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid rgba(0, 191, 255, 0.3);
}

.path-hint i {
    color: rgba(0, 191, 255, 0.8);
}

/* 任务主内容区域 - 左右布局 */
.task-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* 任务输入区域样式 */
.task-input-section {
    background: rgba(26, 32, 46, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    height: fit-content;
    max-height: 600px;
}

.task-input-section:hover {
    border-color: rgba(0, 191, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 191, 255, 0.1);
}

.task-input-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-input-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #00bfff 0%, #0080ff 100%);
    border-radius: 2px;
}

.task-input-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.task-textarea {
    width: 100%;
    min-height: 401px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.task-textarea:focus {
    outline: none;
    border-color: rgba(0, 191, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.1);
}

.task-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* 输入提示样式 */
.input-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 12px;
    background: rgba(0, 191, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(0, 191, 255, 0.1);
}

.input-hint i {
    color: rgba(0, 191, 255, 0.6);
    font-size: 14px;
}

.input-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #00bfff;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.task-controls {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-send {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #00bfff 0%, #0080ff 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 191, 255, 0.3);
}

.btn-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 191, 255, 0.4);
}

.btn-send:disabled {
    background: rgba(107, 114, 128, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-clear {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #ef4444;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}

/* 任务输出区域样式 */
.task-output-section {
    background: rgba(26, 32, 46, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    height: 600px;
    max-height: 600px;

}

.task-output-section:hover {
    border-color: rgba(0, 191, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 191, 255, 0.1);
}

.task-output-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-output-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 2px;
}

/* 任务结果展示区域样式 */
.task-result-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.result-status i {
    font-size: 12px;
    transition: all 0.3s ease;
}

.result-status.waiting i {
    color: #6b7280;
}

.result-status.processing i {
    color: #f59e0b;
    animation: spin 1s linear infinite;
}

.result-status.success i {
    color: #22c55e;
    animation: pulse-green 2s infinite;
}

.result-status.error i {
    color: #ef4444;
    animation: pulse-red 2s infinite;
}

.result-status span {
    color: rgba(255, 255, 255, 0.8);
}

.result-actions {
    display: flex;
    gap: 8px;
}

.btn-copy-result,
.btn-clear-result {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-copy-result {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.btn-copy-result:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-1px);
}

.btn-clear-result {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-clear-result:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.output-container {
    min-height: 440px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.output-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 450px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.output-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: rgba(0, 191, 255, 0.3);
}

.output-placeholder p {
    font-size: 16px;
}

/* 执行日志样式 */
.task-execution-log {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.log-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    color: #00bfff;
}

.log-header i {
    font-size: 18px;
}

.log-timestamp {
    margin-left: auto;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
}

.log-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid;
    transition: all 0.3s ease;
}

.log-item i {
    font-size: 16px;
    margin-top: 2px;
    min-width: 16px;
}

.log-item span {
    flex: 1;
    word-break: break-word;
}

.log-item.log-info {
    border-left-color: #00bfff;
    background: rgba(0, 191, 255, 0.05);
}

.log-item.log-info i {
    color: #00bfff;
}

.log-item.log-processing {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
    animation: pulse-log 2s infinite;
}

.log-item.log-processing i {
    color: #f59e0b;
}

.log-item.log-wait {
    border-left-color: #6b7280;
    background: rgba(107, 114, 128, 0.05);
}

.log-item.log-wait i {
    color: #6b7280;
}

.log-item.log-success {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
}

.log-item.log-success i {
    color: #22c55e;
}

.log-item.log-error {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.log-item.log-error i {
    color: #ef4444;
}

@keyframes pulse-log {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* 流式输出内容样式 */
.stream-output-content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-in;
}

/* 打字中的光标 */
.stream-output-content::after {
    content: '▊';
    color: #00bfff;
    animation: blink-cursor 0.5s ease-in-out infinite;
    margin-left: 3px;
    font-size: 16px;
    font-weight: 700;
    display: inline-block;
    vertical-align: baseline;
}

/* 打字完成后隐藏光标 */
.stream-output-content.typing-complete::after {
    content: '';
    display: none;
    animation: none;
}

@keyframes blink-cursor {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.2;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* 任务结果内容样式 */
.task-result-content {
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 400px;
    overflow-y: auto;
}

.task-result-content::-webkit-scrollbar {
    width: 6px;
}

.task-result-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.task-result-content::-webkit-scrollbar-thumb {
    background: rgba(0, 191, 255, 0.3);
    border-radius: 3px;
}

.task-result-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 191, 255, 0.5);
}

.task-result-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    border-radius: 6px;
    margin: 8px 0;
    overflow-x: auto;
    border-left: 3px solid #00bfff;
}

.task-result-content code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    color: #00bfff;
}

.task-result-content h1,
.task-result-content h2,
.task-result-content h3,
.task-result-content h4,
.task-result-content h5,
.task-result-content h6 {
    color: #00bfff;
    margin: 16px 0 8px 0;
}

.task-result-content ul,
.task-result-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.task-result-content li {
    margin: 4px 0;
}

.task-result-content blockquote {
    border-left: 3px solid #22c55e;
    padding-left: 12px;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Claude 连接状态指示器样式 */
.claude-connection-status {
    display: flex;
    align-items: center;
    margin-left: 10px;
    cursor: help;
    transition: all 0.3s ease;
}

.claude-connection-status:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.status-indicator {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

/* 红绿灯状态光效果 */
.status-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

/* 未连接状态 - 红灯 */
.status-indicator[data-status="disconnected"] .status-light {
    background: #ef4444;
    box-shadow:
        0 0 10px rgba(239, 68, 68, 0.6),
        0 0 20px rgba(239, 68, 68, 0.3),
        inset 0 0 5px rgba(255, 255, 255, 0.2);
    animation: pulse-red-light 2s infinite;
}

/* 连接中状态 - 黄灯 */
.status-indicator[data-status="connecting"] .status-light {
    background: #f59e0b;
    box-shadow:
        0 0 10px rgba(245, 158, 11, 0.6),
        0 0 20px rgba(245, 158, 11, 0.3),
        inset 0 0 5px rgba(255, 255, 255, 0.2);
    animation: pulse-yellow-light 1s infinite;
}

/* 已连接状态 - 绿灯 */
.status-indicator[data-status="connected"] .status-light {
    background: #22c55e;
    box-shadow:
        0 0 10px rgba(34, 197, 94, 0.6),
        0 0 20px rgba(34, 197, 94, 0.3),
        inset 0 0 5px rgba(255, 255, 255, 0.2);
    animation: pulse-green-light 2s infinite;
}

/* 错误状态 - 红灯闪烁 */
.status-indicator[data-status="error"] .status-light {
    background: #dc2626;
    box-shadow:
        0 0 10px rgba(220, 38, 38, 0.8),
        0 0 20px rgba(220, 38, 38, 0.4),
        inset 0 0 5px rgba(255, 255, 255, 0.2);
    animation: blink-red-light 0.5s infinite;
}

/* 红灯脉冲动画 */
@keyframes pulse-red-light {

    0%,
    100% {
        box-shadow:
            0 0 10px rgba(239, 68, 68, 0.6),
            0 0 20px rgba(239, 68, 68, 0.3),
            inset 0 0 5px rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow:
            0 0 15px rgba(239, 68, 68, 0.8),
            0 0 30px rgba(239, 68, 68, 0.4),
            inset 0 0 8px rgba(255, 255, 255, 0.3);
    }
}

/* 黄灯脉冲动画 */
@keyframes pulse-yellow-light {

    0%,
    100% {
        box-shadow:
            0 0 10px rgba(245, 158, 11, 0.6),
            0 0 20px rgba(245, 158, 11, 0.3),
            inset 0 0 5px rgba(255, 255, 255, 0.2);
        opacity: 1;
    }

    50% {
        box-shadow:
            0 0 15px rgba(245, 158, 11, 0.8),
            0 0 30px rgba(245, 158, 11, 0.4),
            inset 0 0 8px rgba(255, 255, 255, 0.3);
        opacity: 0.7;
    }
}

/* 绿灯脉冲动画 */
@keyframes pulse-green-light {

    0%,
    100% {
        box-shadow:
            0 0 10px rgba(34, 197, 94, 0.6),
            0 0 20px rgba(34, 197, 94, 0.3),
            inset 0 0 5px rgba(255, 255, 255, 0.2);
    }

    50% {
        box-shadow:
            0 0 15px rgba(34, 197, 94, 0.8),
            0 0 30px rgba(34, 197, 94, 0.4),
            inset 0 0 8px rgba(255, 255, 255, 0.3);
    }
}

/* 红灯闪烁动画 */
@keyframes blink-red-light {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}



#status-text {
    font-size: 12px;
    font-weight: 500;

}

/* 状态文本颜色 */
.status-indicator[data-status="disconnected"]~.status-text {
    color: #ef4444;
}

.status-indicator[data-status="connecting"]~.status-text {
    color: #f59e0b;
}

.status-indicator[data-status="connected"]~.status-text {
    color: #22c55e;
}

.status-indicator[data-status="error"]~.status-text {
    color: #dc2626;
}

/* Tooltip 效果 */
.claude-connection-status::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(26, 32, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.claude-connection-status::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 3px);
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: rgba(26, 32, 46, 0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1001;
}

.claude-connection-status:hover::after,
.claude-connection-status:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Footer 布局优化 */
.footer-content {
    display: flex;
    align-items: center;
    width: 100%;
}

.footer-left,
.footer-right {
    flex: 1;
}

.footer-center {}

.footer-left {
    display: flex;
    justify-content: flex-start;
}

.footer-right {
    display: flex;
    justify-content: flex-end;
}

/* 禁用状态的文本框样式增强 */
.task-textarea:disabled {
    background: rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.2);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.task-textarea:disabled::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.btn-clear:disabled {
    background: rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.2);
    color: rgba(107, 114, 128, 0.5);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 命令行模式按钮激活状态 */
.cmd-mode-btn.active {
    background: rgba(0, 191, 255, 0.2);
    border-color: rgba(0, 191, 255, 0.5);
    color: #00bfff;
}

/* 对话历史侧边栏样式 - 重新设计 */
.history-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: linear-gradient(180deg, rgba(26, 32, 46, 0.98) 0%, rgba(20, 25, 38, 0.98) 100%);
    backdrop-filter: blur(30px);
    border-left: 1px solid rgba(0, 191, 255, 0.15);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.history-sidebar.open {
    right: 0;
}

/* 侧边栏头部 */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(0, 191, 255, 0.15);
    background: rgba(0, 191, 255, 0.03);
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #00bfff 0%, #0080ff 100%);
    border-radius: 2px;
}

.btn-close-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-close-sidebar:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transform: rotate(90deg);
}

/* 侧边栏内容区域 */
.sidebar-content {
    flex: 1;
    padding: 16px 20px;
    overflow-y: auto;
    position: relative;
}

/* 添加顶部渐变遮罩 */
.sidebar-content::before {
    content: '';
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(26, 32, 46, 0.8) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(0, 191, 255, 0.3);
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 191, 255, 0.5);
}

.history-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.history-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: rgba(0, 191, 255, 0.3);
}

.history-placeholder p {
    font-size: 16px;
}

/* 历史记录列表样式 - 重新设计 */
.conversation-history-item {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid transparent;
    border-radius: 0 8px 8px 0;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

/* 列表项左侧装饰条 */
.conversation-history-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(135deg, #00bfff 0%, #0080ff 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.conversation-history-item:hover::before {
    transform: scaleY(1);
}

.conversation-history-item:hover {
    background: rgba(0, 191, 255, 0.08);
    border-left-color: #00bfff;
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(0, 191, 255, 0.15);
}

.conversation-history-item.success {
    border-left-color: rgba(34, 197, 94, 0.3);
}

.conversation-history-item.success:hover {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.08);
}

.conversation-history-item.error {
    border-left-color: rgba(239, 68, 68, 0.3);
}

.conversation-history-item.error:hover {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}
.conversation-history-item-content {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    word-break: break-all;
}

/* 历史记录头部 */
.conversation-history-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 12px;
}

/* 时间戳样式 */
.conversation-history-item-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-weight: 500;
}

.conversation-history-item-time::before {
    content: '•';
    color: rgba(0, 191, 255, 0.5);
    font-size: 14px;
}

/* 状态徽章样式 */
.conversation-history-item-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid;
}

.conversation-history-item-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.conversation-history-item-status.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.3);
}

.conversation-history-item-status.success::before {
    background: #22c55e;
    box-shadow: 0 0 4px #22c55e;
}

.conversation-history-item-status.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.conversation-history-item-status.error::before {
    background: #ef4444;
    box-shadow: 0 0 4px #ef4444;
}

/* 历史记录内容 */
.history-item-content {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.history-item:hover .history-item-content {
    color: rgba(255, 255, 255, 0.9);
}

/* 列表序号（可选） */
.history-item-index {
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: rgba(0, 191, 255, 0.2);
    border: 2px solid #00bfff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #00bfff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.history-item:hover .history-item-index {
    opacity: 1;
}

/* 侧边栏遮罩 */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}



/* 工作区项目卡片样式（历史记录页面） */
.workspace-item {
    background: linear-gradient(135deg, #191c54 0%, #1e233a 100%);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.workspace-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.workspace-item:hover::before {
    opacity: 1;
}

.workspace-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.workspace-item-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.workspace-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.workspace-icon i {
    font-size: 24px;
    color: #fff;
}

.workspace-info {
    flex: 1;
    min-width: 0;
}

.workspace-name {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace-path {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'Courier New', monospace;
}

.workspace-meta {
    display: flex;
    gap: 24px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.workspace-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.workspace-meta i {
    font-size: 14px;
}

.workspace-last-task {
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.last-task-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 4px;
}

.last-task-title {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.last-task-title.success {
    color: #4ade80;
}

.last-task-title.error {
    color: #f87171;
}

.workspace-actions {
    position: relative;
    z-index: 9;
    display: flex;
    gap: 12px;
}

.workspace-actions button {
    flex: 1;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-open-workspace {
    background: #fff;
    color: #667eea;
}

.btn-open-workspace:hover {
    background: rgba(219, 213, 247, 0.9);
}

.btn-open-folder {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-open-folder:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .task-container {
        padding: 0 16px;
    }

    .path-selector-group {
        flex-direction: column;
        gap: 8px;
    }

    .path-input-wrapper {
        flex-direction: column;
        gap: 8px;
    }

    .btn-select-path,
    .btn-open-location {
        justify-content: center;
        width: 100%;
    }

    .task-main-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .task-section,
    .task-input-section,
    .task-output-section {
        padding: 16px;
    }

    .output-container {
        min-height: 300px;
    }

    .output-placeholder {
        height: 300px;
    }

    .history-sidebar {
        width: 100%;
        right: -100%;
    }

    .sidebar-content {
        padding: 16px;
    }
}